package com.example.forest.demos.web;


import com.alibaba.fastjson.JSONObject;
import com.dtflys.forest.annotation.*;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * @author zyh
 */
@BaseRequest(
        baseURL = "${tlyUrl}",    // 默认域名
        headers = {
                "Content-Type: application/json",
                "Accept-Charset: utf-8",
        }
)
@Service
public interface TlyInterfaces {

    /**
     * 获取access_token
     * @param grantType
     * @param clientId
     * @param clientSecret
     * @return
     */
    @Post(url = "/o/token",contentType = "application/x-www-form-urlencoded")
    public JSONObject token(@Body("grant_type")String grantType,@Body("client_id")String clientId,@Body("client_secret")String clientSecret);

    @Get(url = "/open-apis/disease/v2/infoList")
    public JSONObject bhInfoList(@Header("Authorization")String auth,@Header("company-id")String companyId,@Query("createTime") String createTime,@Query("page")Integer pageNo,@Query("size")Integer pageSize,@Query("isPlatform")Integer isPlatform,@Query("isBelong")Integer isBelong);

}
